<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:icecore="http://www.icefaces.org/icefaces/core"
    xmlns:ace="http://www.icefaces.org/icefaces/components"
    xmlns:ice="http://www.icesoft.com/icefaces/component">

    <h:head>
        <base href="http://localhost:8080/Tienda_asalinero/" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="./resources/css/#{mbPlantilla.plantilla}/default.css" rel="stylesheet" type="text/css" />
        <link href="./resources/css/#{mbPlantilla.plantilla}/tableLayout.css" rel="stylesheet" type="text/css" />
        <link href="./resources/css/#{mbPlantilla.plantilla}/#{mbPlantilla.plantilla}.css" rel="stylesheet" type="text/css" />
        <title>Tienda</title>
        <style type="text/css">
            table td {
                vertical-align:top
            }
            .modulo_titulo {
                font-weight:bold
            }
        </style>
        <script type="text/javascript">
            function alfanumerico(obj) {
                var v = obj.value.match(/[a-zA-Z0-9 ]+/);
                if (!v) {
                    obj.value = "";
                    return "";
                }
                v = v[0];
                if (v != obj.value) {
                    obj.value = v;
                }
            }
            
            function fecha(obj) {
                var v = obj.value.match(/[0-9\/]+/);
                if (!v) {
                    obj.value = "";
                    return "";
                }
                v = v[0];
                if (v != obj.value) {
                    obj.value = v;
                }
            }
            
            function numerico(obj) {
                var v = parseFloat(obj.value);
                if (!v) v = 0;
                if (v != obj.value) {    
                    obj.value = v;
                }
            }
        </script>
    </h:head>

    <h:body>
        <div align="center">
            <div style="text-align:left" id="wrapper">
                <div id="head">

                    <table>
                        <tr>
                            <td><ice:form>

                                    <c:if test="#{mbPlantilla.plantilla=='zara'}">
                                        <ice:commandLink id="imagenInicioZara" action="/front/inicio"><img  src="./imagenes/iconos/ecf_zara.png" width="145" height="83" alt="modelo1"/></ice:commandLink>
                                    </c:if>
                                    <c:if test="#{mbPlantilla.plantilla=='alcampo'}">
                                        <ice:commandLink id="imagenInicio" action="/front/inicio"><img  src="./imagenes/iconos/ecf_alcampo.png" width="145" height="83" alt="modelo1"/></ice:commandLink>
                                    </c:if>

                                </ice:form></td>
                            <td style="vertical-align: middle;padding-left: 200px"><h1 id="front_titulo" style="font-size: 55px;font-family: comic">EL CORTE FRANCÉS</h1></td> 
                        </tr>

                    </table>



                </div>
                <table id="tabla_body" style="width:100%">
                    <tr>
                        <td id="top" colspan="3">
                            <ui:insert name="top"></ui:insert>
                        </td>
                    </tr>
                    <tr>
                        <td id="left">
                            <ui:insert name="left"></ui:insert>
                        </td>
                        <td id="content">
                            <div><h1 id="title_body"><ui:insert name="title"></ui:insert></h1></div>
                            <script type="text/javascript">
                                document.title = document.getElementById("title_body").innerHTML;
                            </script>
                            <ui:insert name="content"></ui:insert>
                        </td>
                        <c:if test="#{mbPlantilla.plantilla=='zara'}">
                            <td id="right"  style="background-image:url('./imagenes/fondo/fotoFondo.jpg'); background-repeat:no-repeat; background-position: left bottom ">
                                <ui:insert name="right"></ui:insert>
                            </td>                
                        </c:if>
                        <c:if test="#{mbPlantilla.plantilla=='alcampo'}">
                            <td id="right"  style="background-image:url('./imagenes/fondo/centroBueno.png'); background-repeat:no-repeat; background-position: left bottom ">
                                <ui:insert name="right"></ui:insert>
                            </td>                
                        </c:if>
                    </tr>
                    <tr>
                        <td id="bottom" colspan="3">
                            <ui:insert name="bottom"></ui:insert>
                        </td>
                    </tr>
                </table>

                <table style="width:100%">
                    <tr>
                        <td>
                            <a href="./faces/admin/usuario/login.xhtml" style="font-size:xx-medium ;padding-left:20px">Administrador</a>
                        </td>
                        <td align="right">
                            2012 &copy; Sergio Andrés - Iván Díaz - Jónatan Núñez - Javier Pulido - Álvaro Salinero
                        </td>
                    </tr>
                </table>
                <script type="text/javascript">
                    var h = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight;
                    h -= 100;
                    document.getElementById('tabla_body').style.height = h+'px';
                </script>
            </div></div>

        <!-- Se necesita un datable en todas las páginas para que se recarguen los paginator en ajax, no sabemos por qué -->
        <h:form>
            <ace:dataTable style="display:none" value="#{mbListProd.cantidad}" var="var" />
        </h:form>
    </h:body>

</html>
